import request from '@/utils/request'
import data from "@/views/system/dict/data.vue";

// 查询散户商品管理列表
export function listRetailProduct(query) {
  return request({
    url: '/system/retailProduct/list',
    method: 'get',
    params: query
  })
}

// 查询散户商品管理详细
export function getRetailProduct(rId, pId) {
  return request({
    url: '/system/retailProduct/getInfo',
    params: {rId, pId},
    method: 'get'
  })
}

// 新增散户商品管理
export function addRetailProduct(data) {
  return request({
    url: '/system/retailProduct',
    method: 'post',
    data: data
  })
}

// 修改散户商品管理
export function updateRetailProduct(data) {
  return request({
    url: '/system/retailProduct',
    method: 'put',
    data: data
  })
}

// 删除散户商品管理
export function delRetailProduct(rId) {
  return request({
    url: '/system/retailProduct/' + rId,
    method: 'delete'
  })
}

// 获取散户列表
export function getRetails() {
  return request({
    url: '/system/retailProduct/getRetails',
    method: 'get'
  })
}
